﻿Public Class Page : Inherits UserControl

	Public Sub New()
		Location = New Point(-10000, 0)
		ResizeRedraw = True
		DoubleBuffered = True
		Themes.Register(Me)
	End Sub

	ReadOnly Property Window As Window
		Get
			Return Parent
		End Get
	End Property

	Public Caller As Page

	Dim _Menu As MenuItem
	Overridable Property Menu As MenuItem
		Get
			Return _Menu
		End Get
		Set(value As MenuItem)
			_Menu = value
		End Set
	End Property

	Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
		MyBase.OnMouseUp(e)
		If e.Button = Windows.Forms.MouseButtons.Right Then
			Window.ShowContextMenu(Me, e)
		End If
	End Sub

End Class
